 <?php 
  class A{
          function F(){
            echo " 父类在此！<br/>";
          }
      }
      class B extends A{}
      class C extends B{
          function F(){
              echo "调用了父类了<br/>";
              parent::F();
              A::F();
          }
      }
      $C1=new C();
      $C1->F();


       class Child
         {
             public static $num=0;
            public $name;
             //构造方法]'
             function __construct($name) //只有new之后才能调用
             {
                 $this->name=$name;
                 }
                //静态变量不能用this来访问
            public function join()
            {
               echo self::$num;  //可以： Child::$num
                echo $this->name."you"; 
            }    
       }
        
        $child1=new Child("k");
        $child1->join();
        $child1=new Child("a");
        $child1->join();
        $child1=new Child("b");
        $child1->join();
        echo "<br/>".Child::$num;